package design;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;

public class Button extends JButton{
	Icon icon;
	
	public Button(){
		this.setFocusPainted(false);
		this.setBorderPainted(false); 
		this.setContentAreaFilled(true); 
		this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
		this.setVisible(true);
	}
	
	public Button(String str){
	this();
	icon = new ImageIcon("image\\"+str+".jpg");
	this.setIcon(icon);
	}
	
	public Button(String str, String format){
		this();
	 icon = new ImageIcon("image\\"+str+"."+format);
	 this.setIcon(icon);
	}
	
	public void setBounds(int x, int y){
		super.setBounds(x, y, 116, 51);
	}

}
